#ifndef _TELLENC_H_
#define _TELLENC_H_ 1

#ifdef __cplusplus
extern "C" {
#endif

enum tellenc_enc {
	TELLENC_ENC_MIN = -1,

	TELLENC_UNKNOWN = 0,
	TELLENC_BINARY,
	TELLENC_ASCII,
	TELLENC_LATIN1,
	TELLENC_WINDOWS_1252,
	TELLENC_CP437,
	TELLENC_GB2312,
	TELLENC_GBK,
	TELLENC_BIG5,
	TELLENC_SJIS,
	TELLENC_UCS_4BE,
	TELLENC_UCS_4LE,
	TELLENC_UTF_16BE,
	TELLENC_UTF_16LE,
	TELLENC_UTF_8,

	TELLENC_ENC_MAX
};

#define	TELLENC_FLAG_VERBOSE	0x1

int								tellenc_init(void);

void							tellenc_done(void);

enum tellenc_enc				tellenc_tell(const char *_text, int _len,
											 int *_bom_len, int _flags);

const char						*tellenc_enc_name(enum tellenc_enc _enc);

#ifdef __cplusplus
}
#endif

#endif	/* !_TELLENC_H_ */
